import os
import logging
import logging.handlers
from logging.handlers import WatchedFileHandler
import multiprocessing

bind = "122.228.252.77:9898"
# workers = multiprocessing.cpu_count() * 2 + 1   # 进程数
workers = 4
backlog = 512  # 监听队列
chdir = '/home/hj/VPN/Box/'  # 要切换到的工作目录
timeout = 30
worker_class = 'gevent'  # 使用 gevent 模式
threads = 2  # 每个进程开启的线程数
loglevel = 'info'  # 日志级别
access_log_format = '%(t)s %(p)s %(h)s "%(r)s" %(s)s %(L)s %(b)s %(f)s" "%(a)s"'  # 设置gunicorn访问日志格式，错误日志无法设置
#
worker_conntections = 1000  # 最大并发数
pidfile = '/var/run/gunicorn.pid'
accesslog = '/var/log/gunicorn_access.log'
errorlog = '/var/log/gunicorn_error.log'  # 错误日志文件

